package com.province.platform.core.communicator;

import com.province.platform.common.utils.Configuration;
import com.province.platform.core.collector.AbstractCollector;
import com.province.platform.core.constants.CoreConstants;
import com.province.platform.core.reporter.AbstractReporter;

import java.util.List;

public abstract class AbstractContainerCommunicator {
    private Long jobId;

    private Configuration configuration;

    private AbstractCollector collector;

    private AbstractReporter reporter;

    public AbstractContainerCommunicator(Configuration configuration) {
        this.configuration = configuration;
        this.jobId = configuration.getLong(CoreConstants.CORE_CONTAINER_JOB_ID);
    }

    public AbstractCollector getCollector() {
        return collector;
    }

    public void setCollector(AbstractCollector collector) {
        this.collector = collector;
    }

    public AbstractReporter getReporter() {
        return reporter;
    }

    public void setReporter(AbstractReporter reporter) {
        this.reporter = reporter;
    }

    public abstract void registerCommunication(List<Configuration> configurationList);
}
